package com.jishuo.nontax.bfc.dao;

import com.jishuo.nontax.bean.bank.Waitaffirm;
import com.jishuo.nontax.bean.vo.CheckDataVO;
import com.jishuo.nontax.bean.vo.WaitaffirmVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
 * @author hlp
 * @date 2023/2/2 11:11
 * @Description:
 */
@Mapper
public interface WaitaffirmMapper {

    /** 根据收款帐户ID、收款时间查询银行上传待查表 */
    List<WaitaffirmVO> findSendWaitaffirm(@Param("bankid")Long bankid,@Param("paybankdt") String paybankdt);

    /**
     * 按id列表查询
     * @param waitaffirmids id列表
     * @return
     */
    List<WaitaffirmVO> findWaitaffirmByIds(String[] waitaffirmids);

    /** 更新待查收入，根据id */
    int updateWaitaffirm(WaitaffirmVO waitaffirm);

    /** 新增待查收入 */
    int insertWaitaffirm(WaitaffirmVO swaitaffirm);

    /**
     * 根据流水、bankid、日期查询
     * @param bankaffirm 流水
     * @param bankid bankid
     * @param paybankdt 日期，yyyy-mm-dd
     * @return
     */
    WaitaffirmVO selectSwaitaffirm(@Param("bankaffirm") String bankaffirm, @Param("bankid") Long bankid, @Param("paybankdt") String paybankdt);

    /** 获取已对账产生待查.账户id，账号，流水，日期 */
    ArrayList<Waitaffirm> findWaitaffirmReget(WaitaffirmVO waitaffirmVO);

    /** 更新已对账待查 */
    int updateWaitaffirmReset(WaitaffirmVO waitaffirm);

    /** 更新财政查回的待查 */
    int updateWaitaffirmByReget(WaitaffirmVO waitaffirm);

    int updateBankAffirm(WaitaffirmVO waitaffirm);

    int deleteWaitaffirmfiance(@Param("bankid")String bankid, @Param("paybankdt")String paybankdt,@Param("bankaffirm")String bankaffirm);

    int saveWaitaffirmfiance(CheckDataVO checkDataVO);

    /** 分页查询 */
    List<WaitaffirmVO> findWaitAffirmPage(WaitaffirmVO waitaffirmVO);

    /** 根据id查询对象 */
    WaitaffirmVO selectWaitaffirm(long waitaffirmid);

    /** 根据id列表，删除数据 */
    int deleteWaitAffirm(String[] waitaffirmids);

    /** 更改待查，web */
    int updateWaitaffirmff(WaitaffirmVO waitaffirmVO);

    int updateHxBankFfirm(WaitaffirmVO waitaffirmVO);

    List<WaitaffirmVO> findWaitaFfirm(List<String> billids);
}